package c12Swing;

import java.io.File;

import javax.swing.JFileChooser;


public class TestJFileChooser {

	/**
	 * 选择文件假
	 *
	 * @return
	 */
	public static File chooseDir() {
		JFileChooser jFileChooser = new JFileChooser();
		jFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
		jFileChooser.showDialog(null, "确定");

		return jFileChooser.getSelectedFile();
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {

	}

}
